//同步这个表
const seq = require('./connections/mysql_connect');

//因为有很多数据模型，所以在model里用个入口文件一次性导出来
require('./models'); 


seq.authenticate()
.then((result)=> {
  console.log('MySQL server is connected completely.')
})
.catch(err => {
  console.log('MySQL server is failed to be connected. Eroor information is below: /r/n' + err);
});

seq
//.sync({ force: true })  //强制同步
.sync()
.then(()=> {
  console.log('The table has been synchronised into database successfully.');
  process.exit(); //close the sync process 关掉同步进程
})
